package com.education.springbootdemo.utils;

public class SessionUtils {
    static ThreadLocal threadLocal = new ThreadLocal();
    public static void setUserId(Long userId) {
        threadLocal.set(userId);
    }

    public static Long getUserId() {
        Object o = threadLocal.get();
        return (Long)o;
    }

    public static void  remove() {
        threadLocal.remove();
    }
}
